record the speed of objects with raspberry pi